﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
	<link href="js-console.css" rel="stylesheet" />
	<!-- 8. Write an expression that calculates trapezoid's area 
			by given sides a and b and height h. -->
</head>
<body>
	<div id="js-console"></div>
	<script src="js-console.js"></script>
	<script>
		// Trapezoid's parameters
		var a = 13.0;
		var b = 4.0;
		var h = 7.0;

		// Area
		var area = ((a + b) / 2.0) * h;

		// Output
		jsConsole.writeLine("Trapezoid: a = " + a + ", b = " + b + ", h = " + h);
		jsConsole.writeLine("Area = " + area + " square units.");
	</script>
</body>
</html>
